// import homeConfig from "@/router/homeConfig.js";
//
// let homeRoutes = [];
//
// for (let path in homeConfig) {
//   homeRoutes.push({
//     path: path,
//     name:path.replace(/^\/home/, '').replace(/\//g,''),
//     component: homeConfig[path],
//   });
// }
// homeRoutes.push({
//   path: "/home/auth",
//   component:()=>import('@/views/AuthView.vue')
// });
// homeRoutes.push({
//   path: '/home/:error(.*)*',
//   component: ()=>import('@/views/NotFound.vue'),
// });


export default [
  {
    path:"/",
    redirect:"/login",
    meta:{
      isPublic:true
    }
  },
  {
    path:"/login",
    name:"login",
    component:()=>import("@/views/LoginView.vue"),
    meta:{
      isPublic:true
    }
  },
  {
    path:"/home",
    name:"home",
    component:()=>import("@/views/HomeView.vue"),
    children:[
      {
        path: '/home/:error(.*)*',
        component: ()=>import('@/views/NotFound.vue'),
      }
    ]
  },
  {
    path:"/:error(.*)*",
    redirect:"/login",
    meta:{
      isPublic:true
    }
  }
]
